#include <stdio.h>
#include <stdlib.h>
#include "log.h"

int main()
{
	int arg = 12345678;

	// 初始化
	LOG_INIT();

	// 注册控制台输出
	LOG_SUBSCRIBE(log_console_output, LOG_TRACE_LEVEL);

	// 注册文件输出
	LOG_SUBSCRIBE(log_file_output, LOG_TRACE_LEVEL);

//	LOG_SUBSCRIBE(log_console_logger, LOG_DEBUG_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_INFO_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_WARNING_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_ERROR_LEVEL);
//	LOG_SUBSCRIBE(log_console_logger, LOG_CRITICAL_LEVEL);

	LOG(LOG_INFO_LEVEL, "this is raw message ! \n");

	LOGF("this is message, arg:%d !", arg);
	LOGE("this is message, arg:%d !", arg);
	LOGW("this is message, arg:%d !", arg);
	LOGI("this is message, arg:%d !", arg);
	LOGD("this is message, arg:%d !", arg);
	LOGT("this is message, arg:%d !", arg);

    return 0;
}
